package edu.gduf.decortor;

/**
 * Created by xiaoqiang.huang on 2017/2/18.
 * 绿头鸭
 */
public class MallardDuck extends Duck{

    public  MallardDuck(){
        super();
//        使用Quack类处理呱呱叫，所以当performQuck()被调用，叫的职责委托接Quack对象,而我们得到真真的呱呱叫
        quackBehavior = new Quack();
        flyBehavior = new FlyWithWings();
    }

    @Override
    public void display() {
        System.out.println("I'am a real mallard duck");
    }
}
